<template>
  <div class="app-container">

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleSelect"
          v-hasPermi="['buss:customer:add']"
        >查询</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleDeleteone"
          v-hasPermi="['buss:customer:edit']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleExport"
          v-hasPermi="['buss:customer:edit']"
        >导出任务</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-col :span="5">
      <el-table v-loading="loadingPlDCan" :data="queryPlanList" @selection-change="handleSelectionChange" >
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="任务名称" align="center" width="240" prop="planName"  />
      </el-table>
    </el-col>
    <el-col :span="19">
      <el-form ref="customAdministration" :model="customAdministration" :rules="rules" label-width="120px">
      <el-collapse v-model="activeNames">
        <el-collapse-item title="客户类指标" name="11">
          <div>
              <el-col :span="6">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="是否睡眠户" prop="sleepSts1">
                    <el-select v-model="sleepSts1value" placeholder="请选择">
                        <el-option
                          v-for="item in sleepSts1List"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>
          <div>
              <el-col :span="6">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="客户类型" prop="khlx">
                    <el-select v-model="dghvalue" clearable placeholder="请选择">
                        <el-option
                          v-for="item in dghList"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="6">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="客户星级" prop="level">
                    <el-select v-model="xjvalue" clearable placeholder="请选择">
                        <el-option
                          v-for="item in xjList"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="6">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="性别" prop="sex">
                    <el-select v-model="sexvalue" clearable placeholder="请选择">
                        <el-option
                          v-for="item in sexList"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>



          <div>
              <el-col :span="6">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="客群标签" prop="groupLabel">
                    <el-select v-model="kqbqvalue" clearable @change="selectkqbq" multiple placeholder="请选择">
                        <el-option
                          v-for="item in kqbqList"
                          :key="item.value"
                          :label="item.label"
                          :value="`${item.label}|${item.value}`">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="9">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="年龄">
                    <el-col :span="9">
                      <el-form-item prop="age_start"><el-input v-model="customAdministration.age_start" placeholder="请输入年龄" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="6">
                      <el-select v-model="fhvalue25" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList25"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="9">
                      <el-form-item prop="age_end"><el-input v-model="customAdministration.age_end" placeholder="请输入年龄" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="9">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="产品数">
                    <el-col :span="9">
                      <el-form-item prop="cps_start"><el-input v-model="customAdministration.cps_start" placeholder="请输入产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="6">
                      <el-select v-model="fhvalue" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="9">
                      <el-form-item prop="cps_end"><el-input v-model="customAdministration.cps_end" placeholder="请输入产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="有效产品数">
                    <el-col :span="8">
                      <el-form-item prop="yxcps_start"><el-input v-model="customAdministration.yxcps_start" placeholder="请输入有效产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="8">
                      <el-select v-model="fhvalue1" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList1"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="8">
                      <el-form-item prop="yxcps_end"><el-input v-model="customAdministration.yxcps_end" placeholder="请输入有效产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="电银活跃产品数">
                    <el-col :span="8">
                      <el-form-item prop="hydzyhgs_start"><el-input v-model="customAdministration.hydzyhgs_start" placeholder="请输入电银活跃产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="8">
                      <el-select v-model="fhvalue2" :disabled="isDis" placeholder="~">
                          <el-option
                            v-for="item in fhList2"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="8">
                      <el-form-item prop="hydzyhgs_end"><el-input v-model="customAdministration.hydzyhgs_end" placeholder="请输入电银活跃产品数" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

        </el-collapse-item>

      </el-collapse>

      <el-collapse v-model="activeNamesss">
        <el-collapse-item title="存款类" name="12">

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="存款总余额">
                    <el-col :span="7">
                      <el-form-item prop="ckze_start"><el-input v-model="customAdministration.ckze_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue3" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList3"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="ckze_end"><el-input v-model="customAdministration.ckze_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="活期存款余额">
                    <el-col :span="7">
                      <el-form-item prop="ckye_start"><el-input v-model="customAdministration.ckye_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue4" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList4"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="ckye_end"><el-input v-model="customAdministration.ckye_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="定期存款余额">
                    <el-col :span="7">
                      <el-form-item prop="dqye_start"><el-input v-model="customAdministration.dqye_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue5" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList5"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="dqye_end"><el-input v-model="customAdministration.dqye_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="大额存单余额">
                    <el-col :span="7">
                      <el-form-item prop="decd_start"><el-input v-model="customAdministration.decd_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue6" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList6"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="decd_end"><el-input v-model="customAdministration.decd_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="上年存款日均">
                    <el-col :span="7">
                      <el-form-item prop="snckrj_start"><el-input v-model="customAdministration.snckrj_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue7" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList7"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="snckrj_end"><el-input v-model="customAdministration.snckrj_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="本年存款日均">
                    <el-col :span="7">
                      <el-form-item prop="nrj_start"><el-input v-model="customAdministration.nrj_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue8" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList8"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="nrj_end"><el-input v-model="customAdministration.nrj_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本年交易次数">
                    <el-col :span="7">
                      <el-form-item prop="yhkbnjycs_start"><el-input v-model="customAdministration.yhkbnjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue9" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList9"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbnjycs_end"><el-input v-model="customAdministration.yhkbnjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本年交易金额">
                    <el-col :span="7">
                      <el-form-item prop="yhkbnjyje_start"><el-input v-model="customAdministration.yhkbnjyje_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue10" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList10"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbnjyje_end"><el-input v-model="customAdministration.yhkbnjyje_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本季交易次数">
                    <el-col :span="7">
                      <el-form-item prop="yhkbjjycs_start"><el-input v-model="customAdministration.yhkbjjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue11" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList11"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbjjycs_end"><el-input v-model="customAdministration.yhkbjjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本季交易金额">
                    <el-col :span="7">
                      <el-form-item prop="yhkbjjyje_start"><el-input v-model="customAdministration.yhkbjjyje_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue12" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList12"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbjjyje_end"><el-input v-model="customAdministration.yhkbjjyje_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本月交易次数">
                    <el-col :span="7">
                      <el-form-item prop="yhkbyjycs_start"><el-input v-model="customAdministration.yhkbyjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue13" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList13"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbyjycs_end"><el-input v-model="customAdministration.yhkbyjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="银行卡本月交易金额">
                    <el-col :span="7">
                      <el-form-item prop="yhkbyjyje_start"><el-input v-model="customAdministration.yhkbyjyje_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue14" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList14"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="yhkbyjyje_end"><el-input v-model="customAdministration.yhkbyjyje_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

        </el-collapse-item>

      </el-collapse>

      <el-collapse v-model="activeNamedkl">
        <el-collapse-item title="贷款类" name="13">

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="贷款余额">
                    <el-col :span="7">
                      <el-form-item prop="dkye_start"><el-input v-model="customAdministration.dkye_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue15" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList15"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="dkye_end"><el-input v-model="customAdministration.dkye_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="本年贷款日均">
                    <el-col :span="7">
                      <el-form-item prop="dknrj_start"><el-input v-model="customAdministration.dknrj_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue16" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList16"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="dknrj_end"><el-input v-model="customAdministration.dknrj_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="上年贷款日均">
                    <el-col :span="7">
                      <el-form-item prop="dksnrj_start"><el-input v-model="customAdministration.dksnrj_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue17" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList17"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="dksnrj_end"><el-input v-model="customAdministration.dksnrj_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="8">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="授信金额">
                    <el-col :span="7">
                      <el-form-item prop="htje_start"><el-input v-model="customAdministration.htje_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue18" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList18"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="htje_end"><el-input v-model="customAdministration.htje_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="16">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="贷款类型" prop="dklxLabel">
                    <el-select v-model="dklxvalue" @change="selectdklx" multiple placeholder="请选择">
                        <el-option
                          v-for="item in dklxList"
                          :key="item.value"
                          :label="item.label"
                          :value="`${item.label}|${item.value}`">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

        </el-collapse-item>

      </el-collapse>

      <el-collapse v-model="activeNamedyqdl">
        <el-collapse-item title="电银渠道类" name="14">

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="手机银行本月交易次数">
                    <el-col :span="7">
                      <el-form-item prop="sjyhbyjycs_start"><el-input v-model="customAdministration.sjyhbyjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue19" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList19"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="sjyhbyjycs_end"><el-input v-model="customAdministration.sjyhbyjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="手机银行本季交易次数">
                    <el-col :span="7">
                      <el-form-item prop="sjyhbjjycs_start"><el-input v-model="customAdministration.sjyhbjjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue20" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList20"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="sjyhbjjycs_end"><el-input v-model="customAdministration.sjyhbjjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="手机银行本年交易次数">
                    <el-col :span="7">
                      <el-form-item prop="sjyhbnjycs_start"><el-input v-model="customAdministration.sjyhbnjycs_start" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>
                    <el-col :span="10">
                      <el-select v-model="fhvalue21" :disabled="isDis" placeholder="请选择">
                          <el-option
                            v-for="item in fhList21"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="7">
                      <el-form-item prop="sjyhbnjycs_end"><el-input v-model="customAdministration.sjyhbnjycs_end" placeholder="" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                    </el-col>

                  </el-form-item>
                </div>
              </el-col>
          </div>

          <div>
              <el-col :span="12">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="电银渠道类型" prop="dyqdLabel">
                    <el-select v-model="dyqdvalue" clearable @change="selectdyqd" multiple placeholder="请选择">
                        <el-option
                          v-for="item in dyqdList"
                          :key="item.value"
                          :label="item.label"
                          :value="`${item.label}|${item.value}`">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

        </el-collapse-item>

      </el-collapse>

      <el-collapse v-model="activeNamedywg">
        <el-collapse-item title="网格属性指标" name="15">

          <div>
              <el-col :span="24">
                <div style="margin: 1.5625rem;font-size: 14px;">
                  <el-form-item label="网格属性类型" prop="wgLabel">
                    <el-select v-model="wgvalue" clearable @change="selectwg" multiple placeholder="请选择">
                        <el-option
                          v-for="item in wgList"
                          :key="item.value"
                          :label="item.label"
                          :value="`${item.label}|${item.value}`">
                        </el-option>
                      </el-select>
                  </el-form-item>
                </div>
              </el-col>
          </div>

        </el-collapse-item>

      </el-collapse>

      <div style="margin-top: 25px;text-align: center;">
        <el-col :span="24">
           <el-form-item label="" prop="field101">
              <el-button type="primary" size="medium" @click="planSelect"> 方案查询 </el-button>
              <el-button type="primary" size="medium" @click="planOver"> 方案保存 </el-button>
              <!-- <el-button type="primary" size="medium"> 群体标签分析导出 </el-button>
              <el-button type="primary" size="medium"> 群体标签导出 </el-button>
              <el-button type="primary" size="medium"> 群体标签批量导入 </el-button> -->
           </el-form-item>
        </el-col>
      </div>


      </el-form>



      <el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange" >
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="姓名" align="center" width="240" prop="name"  />
        <el-table-column label="证件号码" align="center" width="240" prop="idCard"  />
        <el-table-column label="年龄" align="center" width="240" prop="age"  />
        <el-table-column label="性别" align="center" width="240" prop="sex" :formatter="sexFormat" />
        <el-table-column label="客户等级" align="center" width="240" prop="level"  :formatter="khxjFormat" />
        <el-table-column label="是否社保卡" align="center" width="240" prop="sfsbk"  :formatter="sbkFormat" />
        <el-table-column label="存款余额" align="center" width="240" prop="ckze"  />
        <el-table-column label="活期余额" align="center" width="240" prop="ckye"  />
        <el-table-column label="定期余额" align="center" width="240" prop="dqye"  />
        <el-table-column label="上年存款日均" align="center" width="240" prop="snckrj"  />
        <el-table-column label="本年存款日均" align="center" width="240" prop="nrj"  />
        <el-table-column label="银行卡本年交易次数" align="center" width="240" prop="yhkbnjycs"  />
        <el-table-column label="银行卡本年交易发生额" align="center" width="240" prop="yhkbnjyje"  />
        <el-table-column label="银行卡本月交易次数" align="center" width="240" prop="yhkbyjycs"  />
        <el-table-column label="银行卡本月交易发生额" align="center" width="240" prop="yhkbyjyje"  />
        <el-table-column label="手机银行本年交易次数" align="center" width="240" prop="sjyhbnjycs"  />
        <el-table-column label="手机银行本季交易次数" align="center" width="240" prop="sjyhbjjycs"  />
        <el-table-column label="手机银行本月交易次数" align="center" width="240" prop="sjyhbyjycs"  />
        <el-table-column label="合欢家" align="center" width="240" prop="hjh"  />
        <el-table-column label="金领红" align="center" width="240" prop="jlh"  />
        <el-table-column label="按揭" align="center" width="240" prop="aj"  />
        <el-table-column label="是否理财" align="center" width="240" prop="sflc" :formatter="sflcFormat" />
        <el-table-column label="是否手机银行" align="center" width="240" prop="sfsjyh" :formatter="sfsjyhFormat" />
        <el-table-column label="是否网银" align="center" width="240" prop="sfwsyh" :formatter="sfwsyhFormat" />
        <el-table-column label="是否第三方支付" align="center" width="240" prop="sfdsfzf" :formatter="sfdsfzfFormat" />
        <el-table-column label="是否收银宝" align="center" width="240" prop="sfsyb" :formatter="sfsybFormat" />
        <el-table-column label="是否pos" align="center" width="240" prop="sfpos" :formatter="sfposFormat" />
        <el-table-column label="是否贷记卡" align="center" width="240" prop="sfxyk" :formatter="sfxykFormat" />
        <el-table-column label="是否代发薪" align="center" width="240" prop="sfdf" :formatter="sfdfFormat" />
        <el-table-column label="是否银行卡" align="center" width="240" prop="sfbank" :formatter="sfbankFormat" />
      </el-table>

      <pagination
        v-show="ifShowOne"
        :total="totalOne"
        :page.sync="customAdministration.pageNum"
        :limit.sync="customAdministration.pageSize"
        @pagination="handleSelect" />

      <pagination
        v-show="ifShowTwo"
        :total="total"
        :page.sync="customAdministration.pageNum"
        :limit.sync="customAdministration.pageSize"
        @pagination="planSelect" />

    </el-col>






    <!-- 添加或修改客户信息对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
      <el-form ref="customer" :model="customer" :rules="rules" label-width="120px">
        <el-col :span="24">
          <div style="margin: 1.5625rem;font-size: 14px;">
            <el-collapse v-model="activeNames">
              <el-collapse-item title="存量客户" name="1">
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item  label="姓名" prop="name"><el-input v-model="customer.name" placeholder="请输入姓名" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="身份证号" prop="idCard">
                          <el-input v-model="customer.idCard" placeholder="请输入身份证" clearable :style="{ width: '100%' }"></el-input>
                        </el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="户主姓名" prop="hzxm">
                          <el-input v-model="customer.hzxm" placeholder="请输入户主姓名" clearable :style="{ width: '100%' }"></el-input>
                        </el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="户籍编号" prop="hjbh">
                          <el-input v-model="customer.hjbh" placeholder="请输入户籍编号" clearable :style="{ width: '100%' }"></el-input>
                        </el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="年龄" prop="age"><el-input v-model="customer.age" placeholder="请输入年龄" clearable :style="{ width: '100%' }"></el-input></el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="手机号" prop="phone">
                          <el-input v-model="customer.phone" placeholder="请输入手机号" clearable :style="{ width: '100%' }"></el-input>
                        </el-form-item>
                      </div>
                    </el-col>

                </div>

                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="客户类型" prop="khlx">
                          <el-select v-model="khlxvalue" placeholder="请选择">
                              <el-option
                                v-for="item in khlx"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                              </el-option>
                            </el-select>
                        </el-form-item>
                      </div>
                    </el-col>
                </div>
                <div>
                    <el-col :span="12">
                      <div style="margin: 1.5625rem;font-size: 14px;">
                        <el-form-item label="客群标签" prop="groupLabel">
                          <el-select v-model="qtbqvalue" @change="selectWorkName" multiple placeholder="请选择">
                              <el-option
                                v-for="item in groupList"
                                :key="item.value"
                                :label="item.groupName"
                                :value="`${item.groupName}|${item.groupCode}`">
                              </el-option>
                            </el-select>
                        </el-form-item>
                      </div>
                    </el-col>
                </div>

              </el-collapse-item>

            </el-collapse>
          </div>
        </el-col>

        <el-col :span="24">
          <div style="margin: 1.5625rem;font-size: 14px;">
            <el-collapse v-model="activeNamesss">
              <el-collapse-item title="网格社区" name="1">
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="家庭人口" prop="labour">
                        <el-input v-model="customer.labour" placeholder="请输入家庭人口" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="地址" prop="address">
                        <el-input v-model="customer.address" placeholder="请输入地址" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="活动次数" prop="joinAcive">
                        <el-input v-model="customer.joinAcive" placeholder="请输入活动参与次数" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="所属社区" prop="sssjsq">
                        <el-select v-model="customer.sssjsq" @change="sssqBlur(customer.sssjsq)" clearable placeholder="请选择"><el-option v-for="item in sssjsqList" :key="item.value" :label="item.sssjsq" :value="item.sssjsq"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="长期居住" prop="longLive">
                        <el-select v-model="cqjzvalue" clearable placeholder="请选择"><el-option v-for="item in cqjz" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="所属小区" prop="sssq">
                        <el-select v-model="customer.sssq" clearable placeholder="请选择"><el-option v-for="item in xsqList" :key="item.value" :label="item.sssq" :value="item.sssq"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="管户机构" prop="orgId">
                        <el-select v-model="orgvalue" @change="orgIdBlur(orgvalue)" clearable placeholder="请选择"><el-option v-for="item in orgList" :key="item.value" :label="item.orgName" :value="item.orgId"></el-option></el-select>
                      </el-input></el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="管户经理" prop="managerId">
                        <el-select v-model="managervalue" clearable placeholder="请选择"><el-option v-for="item in mangerList" :key="item.value" :label="item.userName" :value="item.userId"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="与户主关系" prop="yhzgx">
                        <el-select v-model="yhzgxvalue" clearable placeholder="请选择"><el-option v-for="item in yhzgx" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="备注" prop="remark">
                        <el-input v-model="customer.remark" placeholder="请输入备注" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </el-col>



        <el-col :span="24">
          <div style="margin: 1.5625rem;font-size: 14px;">
            <el-collapse v-model="activeNamesh" >
              <el-collapse-item title="网格商户" name="1">
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="商户门头" prop="shmt">
                        <el-input v-model="customer.shmt" placeholder="请输入商户门头" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="注册名称" prop="shzcmc">
                        <el-input v-model="customer.shzcmc" placeholder="请输入注册名称" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="法定代表人" prop="fddbr">
                        <el-input v-model="customer.fddbr" placeholder="请输入法定代表人" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="代表人证件" prop="fddbrzjhm">
                        <el-input v-model="customer.fddbrzjhm" placeholder="请输入代表人证件" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="实际经营人" prop="sjjyr">
                        <el-input v-model="customer.sjjyr" placeholder="请输入实际经营人" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="经营人证件" prop="sjjyrzjhm">
                        <el-input v-model="customer.sjjyrzjhm" placeholder="请输入经营人证件" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="经营地址" prop="jydz">
                        <el-input v-model="customer.jydz" placeholder="请输入经营地址" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="所属行业" prop="sshy">
                        <el-select v-model="customer.sshy" clearable placeholder="请选择"><el-option v-for="item in sshy" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="经营状况" prop="jyzk">
                        <el-select v-model="customer.jyzk" clearable placeholder="请选择"><el-option v-for="item in jyzk" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">

                    </div>
                  </el-col>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </el-col>

        <el-col :span="24">
          <div style="margin: 1.5625rem;font-size: 14px;">
            <el-collapse v-model="activeNamecj" >
              <el-collapse-item title="网格村居" name="1">
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="镇" prop="town">
                        <el-select v-model="customer.town" @change="townBlur(customer.town)" clearable placeholder="请选择"><el-option v-for="item in townList" :key="item.value" :label="item.town" :value="item.town"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="村组" prop="village">
                        <el-select v-model="customer.village" clearable placeholder="请选择"><el-option v-for="item in vellageList" :key="item.value" :label="item.village" :value="item.village"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="居住地址" prop="JZaddress">
                        <el-input v-model="customer.JZaddress" placeholder="请输入居住地址" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="务工地点" prop="workAddress">
                        <el-input v-model="customer.workAddress" placeholder="请输入务工地点" clearable :style="{ width: '100%' }"></el-input>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="性别" prop="sex">
                        <el-select v-model="xbvalue" clearable placeholder="请选择"><el-option v-for="item in xb" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="与户主关系" prop="yhzgx1">
                        <el-select v-model="cjyhzgxvalue" clearable placeholder="请选择"><el-option v-for="item in cjyhzgx" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="健康状况" prop="health">
                        <el-select v-model="healthvalue" clearable placeholder="请选择"><el-option v-for="item in cjhealth" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="房产" prop="houser">
                        <el-select v-model="houservalue" clearable placeholder="请选择"><el-option v-for="item in houser" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="车产" prop="car">
                        <el-select v-model="carvalue" clearable placeholder="请选择"><el-option v-for="item in car" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
                <div>
                  <el-col :span="12">
                    <div style="margin: 1.5625rem;font-size: 14px;">
                      <el-form-item label="不良嗜好" prop="badHabits">
                        <el-select v-model="badHabitsvalue" clearable placeholder="请选择"><el-option v-for="item in badHabits" :key="item.value" :label="item.label" :value="item.value"></el-option></el-select>
                      </el-form-item>
                    </div>
                  </el-col>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listCustomer, getCustomer, delCustomer, exportQtbqService, deletePlanNew, addCustomer, updateCustomer, queryCustomerInfo, queryPlanNew, addPlanNew, queryResultNew } from "@/api/buss/customer";
import { listSqzxt, getSqzxt, delSqzxt, addSqzxt, updateSqzxt, selectSssqList, orglist, queryManager, addWgsq, listGroup } from '@/api/buss/sqzxt';
import { selectTownOrVillage} from "@/api/buss/gridCJ";

export default {
  name: "Customer",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      ifShowOne: false,
      ifShowTwo: false,
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      isDis: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      totalOne: 0,
      khxjOptions: [],
      sbkbusstypeOptions: [],
      wgList: [
        {
          value: '1',
          label: '网格村居'
        },
        {
          value: '2',
          label: '网格社区'
        },
        {
          value: '3',
          label: '网格商户'
        },
        {
          value: '4',
          label: '专业市场'
        }
      ],
      wgvalue: '',
      dyqdList: [
        {
          value: '0',
          label: '银行卡'
        },
        {
          value: '1',
          label: '手机银行'
        },
        {
          value: '2',
          label: '网银'
        },
        {
          value: '3',
          label: '收银通'
        },
        {
          value: '4',
          label: '收银宝'
        },
        {
          value: '5',
          label: '融合POS'
        },
        {
          value: '6',
          label: '贷记卡'
        },
        {
          value: '8',
          label: '代发工资'
        },
        {
          value: '9',
          label: '省级银行'
        },
        {
          value: '10',
          label: '第三方支付'
        },
        {
          value: '11',
          label: '社保卡'
        },
        {
          value: '12',
          label: '理财'
        }
      ],
      dyqdvalue: '',
      dklxList: [
        {
          value: '0',
          label: '存e贷'
        },
        {
          value: '1',
          label: '有效贷款合同'
        },
        {
          value: '2',
          label: '合欢家'
        },
        {
          value: '4',
          label: '阳光e贷'
        },
        {
          value: '5',
          label: '金领红'
        },
        {
          value: '6',
          label: '按揭'
        }
      ],
      dklxvalue: '',
      fhList25: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue25: '0',
      fhList21: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue21: '0',
      fhList20: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue20: '0',
      fhList19: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue19: '0',
      fhList18: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue18: '0',
      fhList17: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue17: '0',
      fhList16: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue16: '0',
      fhList15: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue15: '0',
      fhList14: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue14: '0',
      fhList13: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue13: '0',
      fhList12: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue12: '0',
      fhList11: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue11: '0',
      fhList10: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue10: '0',
      fhList9: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue9: '0',
      fhList8: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue8: '0',
      fhList7: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue7: '0',
      fhList6: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue6: '0',
      fhList5: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue5: '0',
      fhList4: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue4: '0',
      fhList3: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue3: '0',
      fhList2: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue2: '0',
      fhList1: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue1: '0',
      fhList: [
        {
          value: '0',
          label: '~'
        },
        {
          value: '1',
          label: '>='
        },
        {
          value: '2',
          label: '=='
        },
        {
          value: '3',
          label: '<='
        },
        {
          value: '4',
          label: '<'
        }
      ],
      fhvalue: '0',
      kqbqList: [
        {
          value: '0',
          label: '区财政'
        },
        {
          value: '1',
          label: '地方财政'
        },
        {
          value: '2',
          label: '政府专项资金'
        },
        {
          value: '3',
          label: '村级资金'
        },
        {
          value: '4',
          label: '行政事业单位'
        },
        {
          value: '5',
          label: '学校'
        },
        {
          value: '6',
          label: '医院'
        },
        {
          value: '7',
          label: '粮管所'
        },
        {
          value: '8',
          label: '个体工商户'
        },
        {
          value: '9',
          label: '教师'
        },
        {
          value: '10',
          label: '医护'
        },
        {
          value: '11',
          label: '公职人员'
        },
        {
          value: '12',
          label: '外出务工'
        },
        {
          value: '13',
          label: '种植户'
        },
        {
          value: '14',
          label: '养殖户'
        },
        {
          value: '15',
          label: '城镇职工'
        },
        {
          value: '16',
          label: '存量客户'
        }
      ],
      kqbqvalue: '',
      xjList: [
        {
          value: '1',
          label: '一星'
        },
        {
          value: '2',
          label: '二星'
        },
        {
          value: '3',
          label: '三星'
        },
        {
          value: '4',
          label: '四星'
        },
        {
          value: '5',
          label: '五星'
        }
      ],
      xjvalue: '',
      sexList: [
        {
          value: '0',
          label: '女'
        },
        {
          value: '1',
          label: '男'
        }
      ],
      sexvalue: '',
      ageList: [
        {
          value: '1',
          label: '18以下'
        },
        {
          value: '2',
          label: '18-25'
        },
        {
          value: '3',
          label: '25-35'
        },
        {
          value: '4',
          label: '35-55'
        },
        {
          value: '5',
          label: '55-65'
        },
        {
          value: '6',
          label: '65以上'
        }
      ],
      agevalue: '',
      dghList: [
        {
          value: '1',
          label: '对公'
        },
        {
          value: '0',
          label: '对私'
        }
      ],
      dghvalue: '',
      sleepSts1List: [
        {
          value: '1',
          label: '正常'
        },
        {
          value: '0',
          label: '睡眠'
        }
      ],
      sleepSts1value: '1',
      customAdministration: {
        pageNum: 1,
        pageSize: 10,
      },
      activeNames: ['1'],
      activeNamesss: ['1'],
      activeNamedkl: ['1'],
      activeNamedyqdl: ['1'],
      activeNamedywg: ['1'],
      activeNamesh: ['1'],
      activeNamecj: ['1'],
      townvalue: '',
      villagevalue: '',
      customer: {
        name: '',
        idCard: '',
        hzxm: '',
        hjbh: '',
        age: '',
        phone: '',
        labour: '',
        address: '',
        joinAcive: '',
        sssq: '',
        longLive: '',
        yhzgx: '',
        orgId: '',
        managerId: '',
        remark: '',
        sssjsq: '',
        khlx: '',
        groupLabel: '',
        sshy: '',
        jyzk: '',
        jydz: '',
        sjjyrzjhm: '',
        sjjyr: '',
        fddbrzjhm: '',
        fddbr: '',
        shzcmc: '',
        shmt: '',
        town: '',
        village: '',
        JZaddress: '',
        workAddress: '',
        sex: '',
        yhzgx1: '',
        health: '',
        car: '',
        hourse: '',
        badHabits: ''


      },
      cjyhzgx: [
        {
          value: '1',
          label: '户主'
        },
        {
          value: '2',
          label: '配偶'
        },
        {
          value: '3',
          label: '父母'
        },
        {
          value: '4',
          label: '子女'
        },
        {
          value: '5',
          label: '其他'
        }
      ],
      cjyhzgxvalue: '',
      cjhealth: [
        {
          value: '0',
          label: '健康'
        },
        {
          value: '1',
          label: '一般'
        },
        {
          value: '2',
          label: '重大疾病'
        }
      ],
      healthvalue: '',
      car: [
        {
          value: '0',
          label: '私家车'
        },
        {
          value: '1',
          label: '大型农机'
        },
        {
          value: '2',
          label: '无'
        }
      ],
      carvalue: '',
      houser: [
        {
          value: '0',
          label: '农村平方'
        },
        {
          value: '1',
          label: '农村楼房'
        },
        {
          value: '2',
          label: '县级以上商品房'
        }
      ],
      houservalue: '',
      badHabits: [
        {
          value: '0',
          label: '有'
        },
        {
          value: '1',
          label: '无'
        }
      ],
      badHabitsvalue: '',
      xb: [
        {
          value: '0',
          label: '男'
        },
        {
          value: '1',
          label: '女'
        }
      ],
      xbvalue: '',
      cqjz: [
        {
          value: '0',
          label: '是'
        },
        {
          value: '1',
          label: '否'
        }
      ],
      cqjzvalue: '',
      khlx: [
        {
          value: '0',
          label: '普通客户'
        },
        {
          value: '1',
          label: '潜在客户'
        },
        {
          value: '2',
          label: '重点客户'
        }
      ],
      khlxvalue: '',
      jyzk: [
        {
          value: '0',
          label: '关闭'
        },
        {
          value: '1',
          label: '正常'
        },
        {
          value: '2',
          label: '其他'
        }
      ],
      jyzkvalue: '',
      yhzgx: [
        {
          value: '1',
          label: '户主'
        },
        {
          value: '2',
          label: '配偶'
        },
        {
          value: '3',
          label: '父母'
        },
        {
          value: '4',
          label: '子女'
        },
        {
          value: '5',
          label: '其他'
        }
      ],
      yhzgxvalue: '',
      sshy: [
        {
          value: '1',
          label: '餐饮'
        },
        {
          value: '2',
          label: '住宿'
        },
        {
          value: '3',
          label: '商超零售'
        },
        {
          value: '4',
          label: '水产批发'
        },
        {
          value: '5',
          label: '汽车服务'
        },
        {
          value: '6',
          label: '居民服务'
        },
        {
          value: '7',
          label: '其他'
        }
      ],
      sshyvalue: '',
      orgvalue: '',
      sssq: '',
      orgList: [],
      sqKhxx: [],
      sqtype: {
        type: '1'
      },
      xqtype: {
        type: '2',
        sssjsq: ''
      },
      // 机构ID字典
      orgIdOptions: [],
      sssjsqList: [],
      sssjsqvalue: '',
      xsqList: [],
      xqvalue: '',
      manger: {
        orgId: ''
      },
      mangerList: [],
      managervalue: '',
      qtbqvalue: '',
      groupList: [],
      ifUpAndAdd: false,
      upDateId: '',
      queryInfo: {},
      // 客户信息表格数据
      customerList: [],
      // 性别字典
      sexOptions: [],
      levelOptions: [],
      userIdOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        id: null,
        name: null,
        sex: null,
        age: null,
        idCard: null,
        spouseName: null,
        phone: null,
        address: null,
        maritalStatus: null,
        customerType: null,
        customerLevel: null,
        points: null,
        createTime: null,
        updateTime: null,
        status: null,
        remark: null,
        luojiJingdu: null,
        luojiWeidu: null,
        zhenshiJingdu: null,
        zhenshiWeidu: null,
        mapPic: null,
        ifFenpei: null,
        isPublic: null,
        customerLevelZh: null,
        orgId: null,
        managerId: null,
        userId: null,
        color: null,
        birthday: null,
        createUser: null,
        updateUser: null,
        idCardShow: null,
        isExpand: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        name: [
               { required: true, message: '姓名不能为空', trigger: 'blur' },
                 { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
               ],
        sshy: [
           {required: true, message: "所属行业不能为空" ,trigger: 'blur'},
        ],
        shmt: [
           {required: true, message: "商户门头不能为空" ,trigger: 'blur'},
        ],
        jyzk: [
           {required: true, message: "经营状况不能为空" ,trigger: 'blur'},
        ],
        sssjsq: [
           {required: true, message: "所属小区不能为空" ,trigger: 'blur'},
        ],
        sssq: [
           {required: true, message: "所属社区不能为空" ,trigger: 'blur'},
        ],
        town: [
           {required: true, message: "镇不能为空" ,trigger: 'blur'},
        ],
        village: [
           {required: true, message: "村组不能为空" ,trigger: 'blur'},
        ],

      },
      zhen: {
        cjType: '3'      },
      cunzu: {
        cjType: '1',
        town: ''
      },
      townList: [],
      vellageList: [],
      queryPlanList: [],
      loadingPlan: true,
      sflcbusstypeOptions: [],
      sfsjyhbusstypeOptions: [],
      sfwsyhbusstypeOptions: [],
      sfdsfzfbusstypeOptions: [],
      sfsybbusstypeOptions: [],
      sfposbusstypeOptions: [],
      sfxykbusstypeOptions: [],
      sfdfbusstypeOptions: [],
      sfbankbusstypeOptions: []
    };
  },
  created() {
    this.getList();
    this.getDicts("sys_user_sex").then(response => {
      this.sexOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sflcbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfsjyhbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfwsyhbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfdsfzfbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfsybbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfposbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfxykbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfbankbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sfdfbusstypeOptions = response.data;
    });
    this.getDicts("sys_buss_type").then(response => {
      this.sbkbusstypeOptions = response.data;
    });
    this.getDicts("data_customer_level").then(response => {
      this.levelOptions = response.data;
    });
    this.getDicts("sys_org_id").then(response => {
      this.orgIdOptions = response.data;
    });
    this.getDicts("sys_khxj").then(response => {
      this.khxjOptions = response.data;
    });
    this.getDicts("sys_user_id").then(response => {
      this.userIdOptions = response.data;
    });
  },
  methods: {
    /** 查询客户信息列表 */
    getList() {
      this.loading = true;
      listCustomer(this.queryParams).then(response => {
        //this.customerList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
      //查询任务
      this.loadingPlDCan = true;
      queryPlanNew().then(response => {
        this.queryPlanList = response.rows;
        this.loadingPlDCan = false;
        //console.log(JSON.stringify(this.sssjsqList))
      });
      //下拉社区
      selectSssqList(this.sqtype).then(response => {
        this.sssjsqList = response;
        //console.log(JSON.stringify(this.sssjsqList))
      });
      //下拉机构
      orglist().then(response => {
        this.orgList = response.rows;
      });
      //客群标签
      listGroup().then(response => {
         this.groupList = response.rows;
      });
      //镇
      selectTownOrVillage(this.zhen).then(response => {
        this.townList = response.data;

      });
    },
    planSelect() {
      this.$refs["customAdministration"].validate(valid => {

                  var groupLabel = [];
                  for (var i = 0; i < this.kqbqvalue.length; i++) {

                        groupLabel.push({
                             groupCode: this.kqbqvalue[i].split('|')[1],
                             groupName: this.kqbqvalue[i].split('|')[0]
                        })
                  }

                  var dklxLabel = [];
                  for (var i = 0; i < this.dklxvalue.length; i++) {

                        dklxLabel.push({
                             code: this.dklxvalue[i].split('|')[1],
                             name: this.dklxvalue[i].split('|')[0]
                        })
                  }

                  var dyqdLabel = [];
                  for (var i = 0; i < this.dyqdvalue.length; i++) {

                        dyqdLabel.push({
                             code: this.dyqdvalue[i].split('|')[1],
                             name: this.dyqdvalue[i].split('|')[0]
                        })
                  }

                  var wgLabel = [];
                  for (var i = 0; i < this.wgvalue.length; i++) {

                        wgLabel.push({
                             code: this.wgvalue[i].split('|')[1],
                             name: this.wgvalue[i].split('|')[0]
                        })
                  }
                  console.log(JSON.stringify(groupLabel))

                  for (var i = 0; i < wgLabel.length; i++) {
                    if(groupLabel[i].value == '1'){
                      var sfwgcj = '0'
                    }else if(groupLabel[i].value == '2'){
                      var sfwgsq = '0'
                    }else if(groupLabel[i].value == '3'){
                      var sfwgsh = '0'
                    }else if(groupLabel[i].value == '4'){
                      var sfwgzysc = '0'
                    }
                  }
                  for (var i = 0; i < dyqdLabel.length; i++) {
                    if(groupLabel[i].value == '0'){
                      var sfbank = '0'
                    }else if(groupLabel[i].value == '1'){
                      var sfsjyh = '0'
                    }else if(groupLabel[i].value == '2'){
                      var sfwsyh = '0'
                    }else if(groupLabel[i].value == '3'){
                      var sfsyt = '0'
                    }else if(groupLabel[i].value == '4'){
                      var sfsyb = '0'
                    }else if(groupLabel[i].value == '5'){
                      var sfpos = '0'
                    }else if(groupLabel[i].value == '6'){
                      var sfxyk = '0'
                    }else if(groupLabel[i].value == '8'){
                      var sfdf = '0'
                    }else if(groupLabel[i].value == '9'){
                      var sfsjwx = '0'
                    }else if(groupLabel[i].value == '10'){
                      var sfdsfzf = '0'
                    }else if(groupLabel[i].value == '11'){
                      var sfsbk = '0'
                    }else if(groupLabel[i].value == '12'){
                      var sflc = '0'
                    }
                  }

                  for (var i = 0; i < dklxLabel.length; i++) {
                    if(groupLabel[i].value == '0'){
                      var sfetc = '0'
                    }else if(groupLabel[i].value == '1'){
                      var sfyxdk = '0'
                    }else if(groupLabel[i].value == '2'){
                      var hjh = '0'
                    }else if(groupLabel[i].value == '4'){
                      var yged = '0'
                    }else if(groupLabel[i].value == '5'){
                      var jlh = '0'
                    }else if(groupLabel[i].value == '6'){
                      var aj = '0'
                    }
                  }

                  for (var i = 0; i < groupLabel.length; i++) {
                    if(groupLabel[i].groupCode == '0'){
                      var qcz = '0'
                    }else if(groupLabel[i].groupCode == '1'){
                      var dfcz = '0'
                    }else if(groupLabel[i].groupCode == '2'){
                      var zfzx = '0'
                    }else if(groupLabel[i].groupCode == '3'){
                      var cjzj = '0'
                    }else if(groupLabel[i].groupCode == '4'){
                      var xzsydw = '0'
                    }else if(groupLabel[i].groupCode == '5'){
                      var school = '0'
                    }else if(groupLabel[i].groupCode == '6'){
                      var hospital = '0'
                    }else if(groupLabel[i].groupCode == '7'){
                      var lgs = '0'
                    }else if(groupLabel[i].groupCode == '8'){
                      var gtgsh = '0'
                    }else if(groupLabel[i].groupCode == '9'){
                      var teacher = '0'
                    }else if(groupLabel[i].groupCode == '10'){
                      var doctor = '0'
                    }else if(groupLabel[i].groupCode == '11'){
                      var gzry = '0'
                    }else if(groupLabel[i].groupCode == '12'){
                      var wcwg = '0'
                    }else if(groupLabel[i].groupCode == '13'){
                      var zzdh = '0'
                    }else if(groupLabel[i].groupCode == '14'){
                      var yzdh = '0'
                    }else if(groupLabel[i].groupCode == '15'){
                      var czzg = '0'
                    }else if(groupLabel[i].groupCode == '16'){
                      var khlx = '0'
                    }
                  }
                  console.log(this.dghvalue)
                  var addPlan = {
                    //planName: value,
                    sleepSts: this.sleepSts1value,
                    pageNum: this.customAdministration.pageNum,
                    pageSize: this.customAdministration.pageSize,
                    //khlx: this.dghvalue,
                    khlx: this.dghvalue,
                    age_start: this.customAdministration.age_start,
                    age_end: this.customAdministration.age_end,
                    sex: this.sexvalue,
                    level: this.xjvalue,
                    sfwgcj: sfwgcj,
                    sfwgsq: sfwgsq,
                    sfwgsh: sfwgsh,
                    sfwgzysc: sfwgzysc,
                    sfbank: sfbank,
                    sfsjyh: sfsjyh,
                    sfwsyh: sfwsyh,
                    sfsyt: sfsyt,
                    sfsyb: sfsyb,
                    sfpos: sfpos,
                    sfxyk: sfxyk,
                    sfyxdk: sfyxdk,
                    sflc: sflc,
                    sfdf: sfdf,
                    sfsjwx: sfsjwx,
                    sfdsfzf: sfdsfzf,
                    sfsbk: sfsbk,
                    sfetc: sfetc,
                    sfyxdk: sfyxdk,
                    hjh: hjh,
                    yged: yged,
                    jlh: jlh,
                    aj: aj,
                    czzg: czzg,
                    qcz: qcz,
                    dfcz: dfcz,
                    zfzx: zfzx,
                    cjzj: cjzj,
                    xzsydw: xzsydw,
                    school: school,
                    hospital: hospital,
                    lgs: lgs,
                    gtgsh: gtgsh,
                    teacher: teacher,
                    doctor: doctor,
                    gzry: gzry,
                    wcwg: wcwg,
                    zzdh: zzdh,
                    yzdh: yzdh,
                    //groupLabel: groupLabel,
                    cps_start: this.customAdministration.cps_start,
                    cps_end: this.customAdministration.cps_end,
                    yxcps_start: this.customAdministration.yxcps_start,
                    yxcps_end: this.customAdministration.yxcps_end,
                    hydzyhgs_start: this.customAdministration.hydzyhgs_start,
                    hydzyhgs_end: this.customAdministration.hydzyhgs_end,
                    ckze_start: this.customAdministration.ckze_start,
                    ckze_end: this.customAdministration.ckze_end,
                    ckye_start: this.customAdministration.ckye_start,
                    ckye_end: this.customAdministration.ckye_end,
                    dqye_start: this.customAdministration.dqye_start,
                    dqye_end: this.customAdministration.dqye_end,
                    decd_start: this.customAdministration.decd_start,
                    decd_end: this.customAdministration.decd_end,
                    snckrj_start: this.customAdministration.snckrj_start,
                    snckrj_end: this.customAdministration.snckrj_end,
                    nrj_start: this.customAdministration.nrj_start,
                    nrj_end: this.customAdministration.nrj_end,
                    yhkbnjycs_start: this.customAdministration.yhkbnjycs_start,
                    yhkbnjycs_end: this.customAdministration.yhkbnjycs_end,
                    yhkbnjyje_start: this.customAdministration.yhkbnjyje_start,
                    yhkbnjyje_end: this.customAdministration.yhkbnjyje_end,
                    yhkbjjycs_start: this.customAdministration.yhkbjjycs_start,
                    yhkbjjycs_end: this.customAdministration.yhkbjjycs_end,
                    yhkbjjyje_start: this.customAdministration.yhkbjjyje_start,
                    yhkbjjyje_end: this.customAdministration.yhkbjjyje_end,
                    yhkbyjycs_start: this.customAdministration.yhkbyjycs_start,
                    yhkbyjycs_end: this.customAdministration.yhkbyjycs_end,
                    yhkbyjyje_start: this.customAdministration.yhkbyjyje_start,
                    yhkbyjyje_end: this.customAdministration.yhkbyjyje_end,
                    dkye_start: this.customAdministration.dkye_start,
                    dkye_end: this.customAdministration.dkye_end,
                    dknrj_start: this.customAdministration.dknrj_start,
                    dknrj_end: this.customAdministration.dknrj_end,
                    dksnrj_start: this.customAdministration.dksnrj_start,
                    dksnrj_end: this.customAdministration.dksnrj_end,
                    htje_start: this.customAdministration.htje_start,
                    htje_end: this.customAdministration.htje_end,
                    //dklxLabel: dklxLabel,
                    sjyhbyjycs_start: this.customAdministration.sjyhbyjycs_start,
                    sjyhbyjycs_end: this.customAdministration.sjyhbyjycs_end,
                    sjyhbjjycs_start: this.customAdministration.sjyhbjjycs_start,
                    sjyhbjjycs_end: this.customAdministration.sjyhbjjycs_end,
                    sjyhbnjycs_start: this.customAdministration.sjyhbnjycs_start,
                    sjyhbnjycs_end: this.customAdministration.sjyhbnjycs_end,
                    //dyqdLabel: dyqdLabel,
                    //wgLabel: wgLabel
                  }
                  console.log(addPlan)

                  queryResultNew(addPlan).then(response => {
                    this.customerList = response.rows;
                    this.total = response.total;
                    this.ifShowOne = false;
                    this.ifShowTwo = true;
                    this.$message({
                      type: 'success',
                      message: '查询成功'
                    });
                  });


      });
    },
    planOver() {
      this.$refs["customAdministration"].validate(valid => {
        this.$prompt('请输入任务名称', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                }).then(({ value }) => {

                  var groupLabel = [];
                  for (var i = 0; i < this.kqbqvalue.length; i++) {

                        groupLabel.push({
                             groupCode: this.kqbqvalue[i].split('|')[1],
                             groupName: this.kqbqvalue[i].split('|')[0]
                        })
                  }

                  var dklxLabel = [];
                  for (var i = 0; i < this.dklxvalue.length; i++) {

                        dklxLabel.push({
                             code: this.dklxvalue[i].split('|')[1],
                             name: this.dklxvalue[i].split('|')[0]
                        })
                  }

                  var dyqdLabel = [];
                  for (var i = 0; i < this.dyqdvalue.length; i++) {

                        dyqdLabel.push({
                             code: this.dyqdvalue[i].split('|')[1],
                             name: this.dyqdvalue[i].split('|')[0]
                        })
                  }

                  var wgLabel = [];
                  for (var i = 0; i < this.wgvalue.length; i++) {

                        wgLabel.push({
                             code: this.wgvalue[i].split('|')[1],
                             name: this.wgvalue[i].split('|')[0]
                        })
                  }
                  for (var i = 0; i < wgLabel.length; i++) {
                    if(groupLabel[i].value == '1'){
                      var sfwgcj = '0'
                    }else if(groupLabel[i].value == '2'){
                      var sfwgsq = '0'
                    }else if(groupLabel[i].value == '3'){
                      var sfwgsh = '0'
                    }else if(groupLabel[i].value == '4'){
                      var sfwgzysc = '0'
                    }
                  }
                  for (var i = 0; i < dyqdLabel.length; i++) {
                    if(groupLabel[i].value == '0'){
                      var sfbank = '0'
                    }else if(groupLabel[i].value == '1'){
                      var sfsjyh = '0'
                    }else if(groupLabel[i].value == '2'){
                      var sfwsyh = '0'
                    }else if(groupLabel[i].value == '3'){
                      var sfsyt = '0'
                    }else if(groupLabel[i].value == '4'){
                      var sfsyb = '0'
                    }else if(groupLabel[i].value == '5'){
                      var sfpos = '0'
                    }else if(groupLabel[i].value == '6'){
                      var sfxyk = '0'
                    }else if(groupLabel[i].value == '8'){
                      var sfdf = '0'
                    }else if(groupLabel[i].value == '9'){
                      var sfsjwx = '0'
                    }else if(groupLabel[i].value == '10'){
                      var sfdsfzf = '0'
                    }else if(groupLabel[i].value == '11'){
                      var sfsbk = '0'
                    }else if(groupLabel[i].value == '12'){
                      var sflc = '0'
                    }
                  }

                  for (var i = 0; i < dklxLabel.length; i++) {
                    if(groupLabel[i].value == '0'){
                      var sfetc = '0'
                    }else if(groupLabel[i].value == '1'){
                      var sfyxdk = '0'
                    }else if(groupLabel[i].value == '2'){
                      var hjh = '0'
                    }else if(groupLabel[i].value == '4'){
                      var yged = '0'
                    }else if(groupLabel[i].value == '5'){
                      var jlh = '0'
                    }else if(groupLabel[i].value == '6'){
                      var aj = '0'
                    }
                  }


                  for (var i = 0; i < groupLabel.length; i++) {
                    if(groupLabel[i].groupCode == '0'){
                      var qcz = '0'
                    }else if(groupLabel[i].groupCode == '1'){
                      var dfcz = '0'
                    }else if(groupLabel[i].groupCode == '2'){
                      var zfzx = '0'
                    }else if(groupLabel[i].groupCode == '3'){
                      var cjzj = '0'
                    }else if(groupLabel[i].groupCode == '4'){
                      var xzsydw = '0'
                    }else if(groupLabel[i].groupCode == '5'){
                      var school = '0'
                    }else if(groupLabel[i].groupCode == '6'){
                      var hospital = '0'
                    }else if(groupLabel[i].groupCode == '7'){
                      var lgs = '0'
                    }else if(groupLabel[i].groupCode == '8'){
                      var gtgsh = '0'
                    }else if(groupLabel[i].groupCode == '9'){
                      var teacher = '0'
                    }else if(groupLabel[i].groupCode == '10'){
                      var doctor = '0'
                    }else if(groupLabel[i].groupCode == '11'){
                      var gzry = '0'
                    }else if(groupLabel[i].groupCode == '12'){
                      var wcwg = '0'
                    }else if(groupLabel[i].groupCode == '13'){
                      var zzdh = '0'
                    }else if(groupLabel[i].groupCode == '14'){
                      var yzdh = '0'
                    }else if(groupLabel[i].groupCode == '15'){
                      var czzg = '0'
                    }else if(groupLabel[i].groupCode == '16'){
                      var khlx = '0'
                    }
                  }
                  var addPlan = {
                    planName: value,
                    sleepSts: this.sleepSts1value,
                    khlx: this.dghvalue,
                    age_start: this.customAdministration.age_start,
                    age_end: this.customAdministration.age_end,
                    sex: this.sexvalue,
                    level: this.xjvalue,
                    sfwgcj: sfwgcj,
                    sfwgsq: sfwgsq,
                    sfwgsh: sfwgsh,
                    sfwgzysc: sfwgzysc,
                    sfbank: sfbank,
                    sfsjyh: sfsjyh,
                    sfwsyh: sfwsyh,
                    sfsyt: sfsyt,
                    sfsyb: sfsyb,
                    sfpos: sfpos,
                    sfxyk: sfxyk,
                    sfyxdk: sfyxdk,
                    sflc: sflc,
                    sfdf: sfdf,
                    sfsjwx: sfsjwx,
                    sfdsfzf: sfdsfzf,
                    sfsbk: sfsbk,
                    sfetc: sfetc,
                    sfyxdk: sfyxdk,
                    hjh: hjh,
                    yged: yged,
                    jlh: jlh,
                    aj: aj,
                    czzg: czzg,
                    qcz: qcz,
                    dfcz: dfcz,
                    zfzx: zfzx,
                    cjzj: cjzj,
                    xzsydw: xzsydw,
                    school: school,
                    hospital: hospital,
                    lgs: lgs,
                    gtgsh: gtgsh,
                    teacher: teacher,
                    doctor: doctor,
                    gzry: gzry,
                    wcwg: wcwg,
                    zzdh: zzdh,
                    yzdh: yzdh,
                    //groupLabel: groupLabel,
                    cps_start: this.customAdministration.cps_start,
                    cps_end: this.customAdministration.cps_end,
                    yxcps_start: this.customAdministration.yxcps_start,
                    yxcps_end: this.customAdministration.yxcps_end,
                    hydzyhgs_start: this.customAdministration.hydzyhgs_start,
                    hydzyhgs_end: this.customAdministration.hydzyhgs_end,
                    ckze_start: this.customAdministration.ckze_start,
                    ckze_end: this.customAdministration.ckze_end,
                    ckye_start: this.customAdministration.ckye_start,
                    ckye_end: this.customAdministration.ckye_end,
                    dqye_start: this.customAdministration.dqye_start,
                    dqye_end: this.customAdministration.dqye_end,
                    decd_start: this.customAdministration.decd_start,
                    decd_end: this.customAdministration.decd_end,
                    snckrj_start: this.customAdministration.snckrj_start,
                    snckrj_end: this.customAdministration.snckrj_end,
                    nrj_start: this.customAdministration.nrj_start,
                    nrj_end: this.customAdministration.nrj_end,
                    yhkbnjycs_start: this.customAdministration.yhkbnjycs_start,
                    yhkbnjycs_end: this.customAdministration.yhkbnjycs_end,
                    yhkbnjyje_start: this.customAdministration.yhkbnjyje_start,
                    yhkbnjyje_end: this.customAdministration.yhkbnjyje_end,
                    yhkbjjycs_start: this.customAdministration.yhkbjjycs_start,
                    yhkbjjycs_end: this.customAdministration.yhkbjjycs_end,
                    yhkbjjyje_start: this.customAdministration.yhkbjjyje_start,
                    yhkbjjyje_end: this.customAdministration.yhkbjjyje_end,
                    yhkbyjycs_start: this.customAdministration.yhkbyjycs_start,
                    yhkbyjycs_end: this.customAdministration.yhkbyjycs_end,
                    yhkbyjyje_start: this.customAdministration.yhkbyjyje_start,
                    yhkbyjyje_end: this.customAdministration.yhkbyjyje_end,
                    dkye_start: this.customAdministration.dkye_start,
                    dkye_end: this.customAdministration.dkye_end,
                    dknrj_start: this.customAdministration.dknrj_start,
                    dknrj_end: this.customAdministration.dknrj_end,
                    dksnrj_start: this.customAdministration.dksnrj_start,
                    dksnrj_end: this.customAdministration.dksnrj_end,
                    htje_start: this.customAdministration.htje_start,
                    htje_end: this.customAdministration.htje_end,
                    //dklxLabel: dklxLabel,
                    sjyhbyjycs_start: this.customAdministration.sjyhbyjycs_start,
                    sjyhbyjycs_end: this.customAdministration.sjyhbyjycs_end,
                    sjyhbjjycs_start: this.customAdministration.sjyhbjjycs_start,
                    sjyhbjjycs_end: this.customAdministration.sjyhbjjycs_end,
                    sjyhbnjycs_start: this.customAdministration.sjyhbnjycs_start,
                    sjyhbnjycs_end: this.customAdministration.sjyhbnjycs_end,
                    //dyqdLabel: dyqdLabel,
                    //wgLabel: wgLabel
                  }
                  console.log(addPlan)

                  addPlanNew(addPlan).then(response => {
                    this.$message({
                      type: 'success',
                      message: '你的任务名称是: ' + value
                    });
                  });

                }).catch(() => {
                  this.$message({
                    type: 'info',
                    message: '取消输入'
                  });
                });
      });

    },
    /** 点击客户视图操作 */
    handleDetailTable(row) {
      const tableId = row.idCard;
      this.$router.push("/buss/detailTable/" + tableId);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },

    townBlur(townvalue) {
      this.cunzu.town = townvalue
      selectTownOrVillage(this.cunzu).then(response => {
        this.vellageList = response.data;
        //console.log(JSON.stringify(this.sssjsqList))
      });
    },

    sssqBlur(sssjsqvalue) {
      //下拉小区
      this.xqtype.sssjsq = sssjsqvalue
      selectSssqList(this.xqtype).then(response => {
        this.xsqList = response;
        //console.log(JSON.stringify(this.sssjsqList))
      });
      console.log(sssjsqvalue)
    },

    //客户经理
    orgIdBlur(mg) {
      this.manger.orgId = mg;
      queryManager(this.manger).then(response => {
        this.mangerList = response.rows;
      });
    },

    selectwg(id){
      var sp = JSON.stringify(this.wgvalue);
      let [lable,vaue] = sp.split('|')
        console.log(vaue)
        console.log("select中对应value值",JSON.stringify(this.wgvalue))
    },

    selectdyqd(id){
      var sp = JSON.stringify(this.dyqdvalue);
      let [lable,vaue] = sp.split('|')
        console.log(vaue)
        console.log("select中对应value值",JSON.stringify(this.dyqdvalue))
    },

    selectdklx(id){
      var sp = JSON.stringify(this.dklxvalue);
      let [lable,vaue] = sp.split('|')
        console.log(vaue)
        console.log("select中对应value值",JSON.stringify(this.dklxvalue))
    },

    selectkqbq(id){
      var sp = JSON.stringify(this.kqbqvalue);
      let [lable,vaue] = sp.split('|')
        console.log(vaue)
        console.log("select中对应value值",JSON.stringify(this.kqbqvalue))
    },

    selectWorkName(id){
      var sp = JSON.stringify(this.qtbqvalue);
      let [lable,vaue] = sp.split('|')
        console.log(vaue)
        console.log("select中对应value值",JSON.stringify(this.qtbqvalue))
    },

    // 业务是否类型字典翻译
    sbkFormat(row, column) {
      return this.selectDictLabel(this.sbkbusstypeOptions, row.sfsbk);
    },
    sflcFormat(row, column) {
      return this.selectDictLabel(this.sflcbusstypeOptions, row.sflc);
    },
    sfsjyhFormat(row, column) {
      return this.selectDictLabel(this.sfsjyhbusstypeOptions, row.sfsjyh);
    },
    sfwsyhFormat(row, column) {
      return this.selectDictLabel(this.sfwsyhbusstypeOptions, row.sfwsyh);
    },
    sfdsfzfFormat(row, column) {
      return this.selectDictLabel(this.sfdsfzfbusstypeOptions, row.sfdsfzf);
    },
    sfsybFormat(row, column) {
      return this.selectDictLabel(this.sfsybbusstypeOptions, row.sfsyb);
    },
    sfposFormat(row, column) {
      return this.selectDictLabel(this.sfposbusstypeOptions, row.sfpos);
    },
    sfxykFormat(row, column) {
      return this.selectDictLabel(this.sfxykbusstypeOptions, row.sfxyk);
    },
    sfdfFormat(row, column) {
      return this.selectDictLabel(this.sfdfbusstypeOptions, row.sfdf);
    },
    sfbankFormat(row, column) {
      return this.selectDictLabel(this.sfbankbusstypeOptions, row.sfbank);
    },
    // 客户星级字典翻译
    khxjFormat(row, column) {
      return this.selectDictLabel(this.khxjOptions, row.level);
    },
    // 性别字典翻译
    sexFormat(row, column) {
      return this.selectDictLabel(this.sexOptions, row.sex);
    },
    levelFormat(row, column) {
      return this.selectDictLabel(this.levelOptions, row.customerLevelZh);
    },
    orgIdFormat(row, column) {
      return this.selectDictLabel(this.orgIdOptions, row.orgId);
    },
    userIdFormat(row, column) {
      return this.selectDictLabel(this.userIdOptions, row.userId);
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        name: null,
        sex: null,
        age: null,
        idCard: null,
        spouseName: null,
        phone: null,
        address: null,
        maritalStatus: "0",
        customerType: null,
        customerLevel: null,
        points: null,
        createTime: null,
        updateTime: null,
        status: "0",
        remark: null,
        luojiJingdu: null,
        luojiWeidu: null,
        zhenshiJingdu: null,
        zhenshiWeidu: null,
        mapPic: null,
        ifFenpei: null,
        isPublic: null,
        customerLevelZh: null,
        orgId: null,
        managerId: null,
        userId: null,
        color: null,
        birthday: null,
        createUser: null,
        updateUser: null,
        idCardShow: null,
        isExpand: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length

      //console.log(JSON.stringify(selection))
      this.sqKhxx = selection;
    },
    /** 新增按钮操作 */
    handleSelect() {
       var queryData = {
         planCode: this.sqKhxx[0].planCode,
         pageNum: this.customAdministration.pageNum,
         pageSize: this.customAdministration.pageSize
       }
       this.loadingPlan = true;
       queryResultNew(queryData).then(response => {
         this.customerList = response.rows;
         this.totalOne = response.total;
         this.loadingPlan = false;
         this.ifShowOne = true;
         this.ifShowTwo = false;
         //console.log(JSON.stringify(this.sssjsqList))
       });
      //this.sqKhxx = [];
      //this.reset();
      //this.open = true;
      //this.title = "添加客户信息";
    },
    handleDC() {
      var queryData = {
        planCode: this.sqKhxx[0].planCode
      }
      exportQtbqService(queryData).then(response => {
        //this.customerList = response.rows;
       // this.loadingPlan = false;
        //console.log(JSON.stringify(this.sssjsqList))
      });
    },
    /** 修改按钮操作 */
    handleDeleteone(row) {
      //this.reset();
      var deletePlan = [];
      for (var i = 0; i < this.sqKhxx.length; i++) {
        deletePlan.push({
          planCode: this.sqKhxx[i].planCode
        })
      }

      console.log(222)
      this.$confirm('是否确认删除数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return deletePlanNew(deletePlan);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});

    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["customer"].validate(valid => {
        if (valid) {
          console.log(valid)
          if (this.ifUpAndAdd) {
            console.log("修改")

            var group = [];
            for (var i = 0; i < this.qtbqvalue.length; i++) {

                  group.push({
                       groupCode: this.qtbqvalue[i].split('|')[1],
                       groupName: this.qtbqvalue[i].split('|')[0]
                  })
            }
            var sqData = {
              name: this.customer.name,
              idCard: this.customer.idCard,
              hzxm: this.customer.hzxm,
              hjbh: this.customer.hjbh,
              age: this.customer.age,
              phone: this.customer.phone,
              groupLabel: group,
              customerType: this.khlxvalue,
              id: this.upDateId,
              dataGtgsh: [{}],
              dataWgWgsq: [{}]

            }

            if(this.queryInfo.dataWgWgsq.length > 0){
              sqData.dataWgWgsq[0].id = this.queryInfo.dataWgWgsq[0].id;
              sqData.dataWgWgsq[0].yhzgx = this.yhzgxvalue;
              sqData.dataWgWgsq[0].remark = this.customer.remark;
              sqData.dataWgWgsq[0].managerId = this.managervalue;
              sqData.dataWgWgsq[0].orgId = this.orgvalue;
              sqData.dataWgWgsq[0].sssq = this.customer.sssq;
              sqData.dataWgWgsq[0].labour = this.customer.labour;
              sqData.dataWgWgsq[0].address = this.customer.address;
              sqData.dataWgWgsq[0].joinAcive = this.customer.joinAcive;
              sqData.dataWgWgsq[0].sssjsq = this.customer.sssjsq;
              sqData.dataWgWgsq[0].longLive = this.cqjzvalue;
            }else{
              sqData.dataWgWgsq = [];
            }

            if(this.queryInfo.dataGtgsh.length > 0){
              sqData.dataGtgsh[0].shmt = this.customer.shmt;
              sqData.dataGtgsh[0].shzcmc = this.customer.shzcmc;
              sqData.dataGtgsh[0].fddbr = this.customer.fddbr;
              sqData.dataGtgsh[0].fddbrzjhm = this.customer.fddbrzjhm;
              sqData.dataGtgsh[0].sjjyr = this.customer.sjjyr;
              sqData.dataGtgsh[0].sjjyrzjhm = this.customer.sjjyrzjhm;
              sqData.dataGtgsh[0].jydz = this.customer.jydz;
              sqData.dataGtgsh[0].sshy = this.customer.sshy;
              sqData.dataGtgsh[0].jyzk = this.customer.jyzk;
              sqData.dataGtgsh[0].id = this.queryInfo.dataGtgsh[0].id;
            }else{
              sqData.dataGtgsh = [];
            }

            if(this.queryInfo.dataWgWgcj.length > 0){
              sqData.dataWgWgcj[0].id = this.queryInfo.dataWgWgcj[0].id;
              sqData.dataWgWgcj[0].town = this.customer.town;
              sqData.dataWgWgcj[0].village = this.customer.village;
              sqData.dataWgWgcj[0].sex = this.xbvalue;
              sqData.dataWgWgcj[0].yhzgx = this.cjyhzgxvalue;
              sqData.dataWgWgcj[0].health = this.healthvalue;
              sqData.dataWgWgcj[0].car = this.carvalue;
              sqData.dataWgWgcj[0].hourse = this.houservalue;
              sqData.dataWgWgcj[0].badHabits = this.badHabitsvalue;
              sqData.dataWgWgcj[0].JZaddress = this.customer.JZaddress;
              sqData.dataWgWgcj[0].workAddress = this.customer.workAddress;
            }else{
              sqData.dataWgWgcj = [];
            }



            this.ifUpAndAdd = true;
            console.log(sqData)
            updateCustomer(sqData).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            var group = [];
            for (var i = 0; i < this.qtbqvalue.length; i++) {

                  group.push({
                       groupCode: this.qtbqvalue[i].split('|')[1],
                       groupName: this.qtbqvalue[i].split('|')[0]
                  })
            }
            var sqData = {
              name: this.customer.name,
              idCard: this.customer.idCard,
              hzxm: this.customer.hzxm,
              hjbh: this.customer.hjbh,
              age: this.customer.age,
              phone: this.customer.phone,
              labour: this.customer.labour,
              address: this.customer.address,
              joinAcive: this.customer.joinAcive,
              sssq: this.xqvalue,
              //longLive: this.customer.longLive,
              yhzgx: this.yhzgxvalue,
              //orgId: this.orgvalue,
              //managerId: this.managervalue,
              remark: this.customer.remark,
              //sssjsq: this.sssjsqvalue,
              groupLabel: group,
              customerType: this.khlxvalue,
              dataGtgsh: [{}],
              dataWgWgsq: [{}],
              dataWgWgcj: [{}]

            }

            if(this.customer.town != ""){
              sqData.dataWgWgcj[0].town = this.customer.town;
            }else{
              sqData.dataWgWgcj = [];
            }
            if(this.customer.village != ""){
              sqData.dataWgWgcj[0].village = this.customer.village;
            }else{
              sqData.dataWgWgcj = [];
            }

            if(this.customer.sex != ""){
              sqData.dataWgWgcj[0].sex = this.xbvalue;
            }
            if(this.cjyhzgxvalue != ""){
              sqData.dataWgWgcj[0].yhzgx = this.cjyhzgxvalue;
            }
            if(this.healthvalue != ""){
              sqData.dataWgWgcj[0].health = this.healthvalue;
            }
            if(this.houservalue != ""){
              sqData.dataWgWgcj[0].hourse = this.houservalue;
            }
            if(this.carvalue != ""){
              sqData.dataWgWgcj[0].car = this.carvalue;
            }
            if(this.badHabitsvalue != ""){
              sqData.dataWgWgcj[0].badHabits = this.badHabitsvalue;
            }
            if(this.customer.JZaddress != ""){
              sqData.dataWgWgcj[0].JZaddress = this.customer.JZaddress;
            }
            if(this.customer.workAddress != ""){
              sqData.dataWgWgcj[0].workAddress = this.customer.workAddress;
            }

            if(this.customer.shmt!=""){
              sqData.dataGtgsh[0].shmt = this.customer.shmt;
            }else{
              sqData.dataGtgsh = [];
            }
            if(this.customer.shzcmc!=""){
              sqData.dataGtgsh[0].shzcmc = this.customer.shzcmc;
            }
            if(this.customer.fddbr!=""){
              sqData.dataGtgsh[0].fddbr = this.customer.fddbr;
            }
            if(this.customer.fddbrzjhm!=""){
              sqData.dataGtgsh[0].fddbrzjhm = this.customer.fddbrzjhm;
            }
            if(this.customer.sjjyr!=""){
              sqData.dataGtgsh[0].sjjyr = this.customer.sjjyr;
            }
            if(this.customer.sjjyrzjhm!=""){
              sqData.dataGtgsh[0].sjjyrzjhm = this.customer.sjjyrzjhm;
            }
            if(this.customer.jydz!=""){
              sqData.dataGtgsh[0].jydz = this.customer.jydz;
            }
            if(this.customer.sshy!=""){
              sqData.dataGtgsh[0].sshy = this.customer.sshy;
            }
            if(this.customer.jyzk!=""){
              sqData.dataGtgsh[0].jyzk = this.customer.jyzk;
            }
            if(this.customer.sssjsq!=""){
              sqData.dataGtgsh[0].sssjsq = this.customer.sssjsq;
            }
            if(this.customer.sssq!=""){
              sqData.dataGtgsh[0].sssq = this.customer.sssq;
            }

            if(this.yhzgxvalue!=""){
              sqData.dataWgWgsq[0].yhzgx = this.yhzgxvalue;
            }
            if(this.customer.remark!=""){
              sqData.dataWgWgsq[0].remark = this.customer.remark;
            }
            if(this.managervalue!=""){
              sqData.dataWgWgsq[0].managerId = this.managervalue;
            }
            if(this.orgvalue!=""){
              sqData.dataWgWgsq[0].orgId = this.orgvalue;
            }
            if(this.customer.sssq!=""){
              sqData.dataWgWgsq[0].sssq = this.customer.sssq;
            }
            if(this.customer.labour!=""){
              sqData.dataWgWgsq[0].labour = this.customer.labour;
            }
            if(this.customer.address!=""){
              sqData.dataWgWgsq[0].address = this.customer.address;
            }
            if(this.customer.joinAcive!=""){
              sqData.dataWgWgsq[0].joinAcive = this.customer.joinAcive;
            }
            if(this.customer.sssjsq!=""){
              sqData.dataWgWgsq[0].sssjsq = this.customer.sssjsq;
            }else{
              sqData.dataWgWgsq = []
            }
            if(this.cqjzvalue!=""){
              sqData.dataWgWgsq[0].longLive = this.cqjzvalue;
            }
            console.log(sqData)
            addCustomer(sqData).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delCustomer(ids);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      var queryData = {
        planCode: this.sqKhxx[0].planCode
      }
      this.download('buss/customQuery/exportZdycxService', {
        ...queryData
      }, `buss_customer.xlsx`)
    }
  }
};
</script>
